﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Gunningine
{
    using System.Drawing;
    using System.Drawing.Imaging;

    public class ImageResource : Resource
    {
        /// <summary>
        /// Image data.
        /// </summary>
        public Bitmap Data { get; set; }

        /// <summary>
        /// Image width.
        /// </summary>
        public int Width { get; set; }

        /// <summary>
        /// Image height.
        /// </summary>
        public int Height { get; set; }

        /// <summary>
        /// Number of channels (ie 3 or 4 for RGB/ARGB).
        /// </summary>
        public int Channels { get; set; }

        /// <summary>
        /// Constructor.
        /// </summary>
        public ImageResource()
        {
        }

        #region Resource implementation.

        /// <summary>
        /// Unload image from memory.
        /// </summary>
        public override void Unload()
        {
            this.Data.Dispose();
        }

        #endregion

    }
}
